home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 8: LINUX Games / Linux Cubed Series 8 - LINUX Games.iso / games / x11 / rpg / crossfir.92 / crossfir / crossfire-0.92.5 / config / crossfire.rules < prev    next >
Text File  |  1996-07-24  |  3KB  |  99 lines

  1. /*
  2.  *  Copyright (C) 1993  Petri Heinila
  3.  *
  4.  *  This program is free software; you can redistribute it and/or modify
  5.  *  it under the terms of the GNU General Public License as published by
  6.  *  the Free Software Foundation; either version 2 of the License, or
  7.  *  (at your option) any later version.
  8.  *
  9.  *  This program is distributed in the hope that it will be useful,
  10.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12.  *  GNU General Public License for more details.
  13.  *
  14.  *  You should have received a copy of the GNU General Public License
  15.  *  along with this program; if not, write to the Free Software
  16.  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  *
  18.  *  Author can be connected by email from Petri.Heinila@lut.fi
  19.  */
  20.  
  21. /*
  22.  * InsertArchive(files,dir)   - put files into packet tree into dir
  23.  * PackArchive(name)          - pack packet tree name
  24.  * MakeArchive(dirs)          - archive in subdirs also
  25.  * InstallPerl(program,dest)  - intall perl (*.pl) script
  26.  */
  27.  
  28.  
  29. /********************************************************************** 
  30.  * Archive rules
  31.  * - set $(ATOP) before use, e.g. ATOP = /tmp/xyzzy (see PackArchive)
  32.  **********************************************************************/
  33.  
  34. /*
  35.  * InsertArchive - insert files to specified dir under ATOP, use this
  36.  * in Imakefiles in all directories
  37.  * - copy files to temporary directory, symbolic link are so get rig off
  38.  */
  39. #ifndef InsertArchive
  40. #define InsertArchive(files,dir) @@\
  41. subarchive:: @@\
  42.     MakeDir($(ATOP)/dir) @@\
  43.     $(CP) files $(ATOP)/dir
  44. #endif
  45.  
  46. /*
  47.  * PackArchive - ,use this in Imakefile in main directory
  48.  */
  49. #ifndef PackArchive
  50. #define PackArchive(name)                @@\
  51. ATOP = /tmp/name                    @@\
  52. TAR = gtar                        @@\
  53. archive: subarchive                        @@\
  54.     $(RM) name.tar.Z                    @@\
  55.     (cd $(ATOP);cd ..;\                    @@\
  56.     $(RM) name.tar name.tar.Z;\                @@\
  57.     $(TAR) cvfhz name.tar.gz `$(BASENAME) $(ATOP)`;\    @@\
  58. /*    $(COMPRESS) name.tar*/)                @@\
  59.     $(MV) $(ATOP)/../name.tar.gz .              @@\
  60.     $(RM) -r $(ATOP)
  61. #endif
  62.  
  63. /*
  64.  * PackShar - use this in Imakefile in main directory
  65.  */
  66.  
  67. #ifndef PackShar
  68. #define PackShar(version,name,me)                    @@\
  69. shar: subarchive                    @@\
  70.     $(RM) name.version.shar.*            @@\
  71.     (cd $(ATOP); cd ..;\                @@\
  72.     $(RM) name.tar name.tar.Z;\            @@\
  73.     find . -type f -print | sort | shar -S -a -s me -c -o name.version.shar -L50)    @@\
  74.     $(MV) $(ATOP)/../name.version.shar* .        @@\
  75.     $(RM) -r $(ATOP)
  76. #endif
  77.  
  78. /*
  79.  * MakeArchive - declare here subdirs to be archived, use this in
  80.  * imake files in all directories
  81.  */
  82. #ifndef MakeArchive
  83. #define MakeArchive(dirs)                         @@\
  84. NamedTargetSubdirs(subarchive,dirs,"archiving",'ATOP=$(ATOP)',subarchive)
  85. #endif
  86.  
  87. /*
  88.  * InstallPerl - install a perl script.
  89.  */
  90. #ifndef InstallPerl
  91. #define    InstallPerl(program,dest)                    @@\
  92. install:: program.pl                        @@\
  93.     MakeDir($(DESTDIR)dest)                        @@\
  94.     $(INSTALL) -c $(INSTBINFLAGS) program.pl $(DESTDIR)dest/program
  95. #endif /* InstallPerl */
  96.  
  97.  
  98. /*** end of config.rules ***/
  99.